Skip to content
This repository was archived by the owner on Jan 9, 2024. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8222438

Browse files
author
Ludovic Barman
committedJul 20, 2018
Bugfix #192 - Not tested but should work
1 parent 11d3004 commit 8222438

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎prifi-lib/relay/init.go

+7
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@ type RelayState struct {
184184
// It takes care to call the correct message handler function.
185185
func (p *PriFiLibRelayInstance) ReceivedMessage(msg interface{}) error {
186186

187+
// this is the exception: this message can be handled concurrently (and needs to be - since it is called
188+
// from a timeout)
189+
switch typedMsg := msg.(type) {
190+
case net.ALL_ALL_SHUTDOWN:
191+
log.Lvl1("Received ALL_ALL_SHUTDOWN, Processing without locking")
192+
p.Received_ALL_ALL_SHUTDOWN(typedMsg)
193+
}
187194
log.Lvl1("Received Message: Waiting for lock")
188195
p.relayState.processingLock.Lock()
189196
defer p.relayState.processingLock.Unlock()

0 commit comments

Comments
 (0)
This repository has been archived.