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 {
3737 Server : s ,
3838 ConnectionId : protoOptions .ConnectionId ,
3939 }
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+ }
4046 protoConfig := protocol.ProtocolConfig {
4147 Name : ProtocolName ,
4248 ProtocolId : ProtocolId ,
@@ -46,7 +52,7 @@ func NewServer(protoOptions protocol.ProtocolOptions, cfg *Config) *Server {
4652 Role : protocol .ProtocolRoleServer ,
4753 MessageHandlerFunc : s .handleMessage ,
4854 MessageFromCborFunc : NewMsgFromCbor ,
49- StateMap : StateMap ,
55+ StateMap : stateMap ,
5056 InitialState : statePropose ,
5157 }
5258 s .Protocol = protocol .New (protoConfig )
You can’t perform that action at this time.
0 commit comments