When a socket with an identity is already started, the
chumak:socket/2 function returns {error, {already_stared, pid()}},
which is the return of supervisor:start_child/2 for that case. This
violates the typespec of chumak:socket/2.
This patch changes that to return the already started socket PID to
the caller.
When a socket with an identity is already started, the
chumak:socket/2
function returns{error, {already_stared, pid()}}
, which is the return ofsupervisor:start_child/2
for that case. This violates the typespec ofchumak:socket/2
.This patch changes that to return the already started socket PID to the caller.