If you have a fish on your line, don't let it splash. If that's not possible, cut your line. If a bear learns it can obtain fish just by approaching fishermen, it will return for more. Give the bear every opportunity to avoid you. If you do encounter a bear at close distance, remain calm.
Attacks are rare.
Chances are, you are not in danger. Most bears are interested only in protecting food, cubs, or their personal space. Once the threat is removed, they will move on. Let the bear know you are human. Talk to the bear in a normal voice.