File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,12 @@ func NewServer(protoOptions protocol.ProtocolOptions, cfg *Config) *Server {
37
37
Server : s ,
38
38
ConnectionId : protoOptions .ConnectionId ,
39
39
}
40
+ // Update state map with timeout
41
+ stateMap := StateMap .Copy ()
42
+ if entry , ok := stateMap [statePropose ]; ok {
43
+ entry .Timeout = s .config .Timeout
44
+ stateMap [statePropose ] = entry
45
+ }
40
46
protoConfig := protocol.ProtocolConfig {
41
47
Name : ProtocolName ,
42
48
ProtocolId : ProtocolId ,
@@ -46,7 +52,7 @@ func NewServer(protoOptions protocol.ProtocolOptions, cfg *Config) *Server {
46
52
Role : protocol .ProtocolRoleServer ,
47
53
MessageHandlerFunc : s .handleMessage ,
48
54
MessageFromCborFunc : NewMsgFromCbor ,
49
- StateMap : StateMap ,
55
+ StateMap : stateMap ,
50
56
InitialState : statePropose ,
51
57
}
52
58
s .Protocol = protocol .New (protoConfig )
You can’t perform that action at this time.
0 commit comments